package com.bosssoft.trainee.nontax.controller;

/**
 * @program:springcloud-rbac-system
 * @author: sct
 * @Time: 2022/7/10  9:53
 * @description:
 */

import com.bosssoft.trainee.nontax.service.FeignService;
import com.bosssoft.trainee.nontax.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@Slf4j
public class FeignController {
    @Resource
    private FeignService feignService;
    @RequestMapping(value = "/department/getParentDepartment")
    public Result<Object> getParentDepartment() {
        return feignService.getParentDepartment();
    }

    @RequestMapping(value = "/permission/{id}")
    public Result<Object> permission(@PathVariable Long id) {
        return feignService.list(id);
    }

    @RequestMapping(value = "/role/check/{id}")
    public Result<Object> rolecheck(@PathVariable Long id) {
        return feignService.rolecheck(id);
    }

    @DeleteMapping(value = "/role/delete/{id}")
    public Result<Object> delete(@PathVariable Long id){
        return feignService.delete(id);
    }

    @RequestMapping(value = "/department/check/{id}")
    public Result<Object> check(@PathVariable Long id){
        return feignService.check(id);
    }
}
